FROM ccr.ccs.tencentyun.com/w7team/swoole:fpm-php7.3
MAINTAINER yuanwentao <admin@w7.com>

ENV WEB_PATH /home/ThinkPHP
ADD . $WEB_PATH
ADD Nginx.conf /usr/local/nginx/conf/vhost/

WORKDIR $WEB_PATH

RUN apk add mysql-client && mkdir -p ./runtime/cache && mkdir -p ./runtime/log
# RUN composer install

CMD ["sh", "start.sh"]

RUN rm -rf Dockerfile .git \
    && chown -R 1000:1000 $WEB_PATH \
    && chmod -R 755 $WEB_PATH
#docker run -it -p 8123:80 -e MYSQL_USERNAME=root -e MYSQL_PASSWORD=123456 -e MYSQL_DATABASE=yoshoptest -e MYSQL_HOST=172.16.1.13 -e REDIS_HOST=172.16.1.13 -e REDIS_PORT=6379 test
#test
#docker run -it -p 8123:80 -e MYSQL_USERNAME=root -e MYSQL_PASSWORD=123456 -e MYSQL_DATABASE=yoshoptest -e MYSQL_HOST=172.16.1.13:3306 -e REDIS_HOST=172.16.1.13 -e REDIS_PORT=6379 test
